﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using XNAchievement.Achievements;

namespace XNAchievement
{
    /// <summary>
    /// This is a default Formatter, returning the name and description
    /// of the achievement.
    /// </summary>
    public class DefaultAchievementFormatter : IAchievementFormatter
    {
        #region IAchievementFormatter Member

        public string FormatAchievement(Achievement achievement)
        {
            return achievement.Name + Environment.NewLine + achievement.Description;
        }

        #endregion
    }

    /// <summary>
    /// This achievement formatter returns only the name of
    /// the achievement.
    /// </summary>
    public class NameOnyFormatter : IAchievementFormatter
    {
        #region IAchievementFormatter Member

        public string FormatAchievement(Achievement achievement)
        {
            return achievement.Name;
        }

        #endregion
    }

    /// <summary>
    /// This achievement formatter returns the name and
    /// the internal name of the achievement.
    /// </summary>
    public class DebugFormatter : IAchievementFormatter
    {
        #region IAchievementFormatter Member

        public string FormatAchievement(Achievement achievement)
        {
            return string.Format("{0} ({1})", achievement.Name, achievement.InternalName);
        }

        #endregion
    }
}
